<!-- 对应角色 -->
<template>
  <div class='corres_role'>
    <CheckboxGroup v-model="roleId">
      <Checkbox v-for="(item,index) in rolelist" :label="item.roleId" border :key='index' :disabled="item.flag==1" class="check_box">{{item.roleName}}</Checkbox>
    </CheckboxGroup>
  </div>
</template>

<script>
export default {
  data() {
    return {
      rolelist: [],
      roleId: [],
    }
  },
  methods: {
    getData(data) {
      this.roleId = []
      this.rolelist = []
      console.log(data)
      this.rolelist = data
      this.rolelist.forEach((item) => {
        if (item.flag == 3) {
          this.roleId.push(item.roleId)
        }
      })
    },
  },
  created() {},
  mounted() {},
}
</script>
<style lang='scss' scoped>
.corres_role {
  .check_box {
    margin: 10px;
    ::v-deep .ivu-checkbox {
      margin-right: 5px;
    }
  }
}
</style>